+Mon Oct 22 14:08:26 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * demos/gtk-demo/appwindow.c: Remove handle_box from App demo.
+
+ * gtk/gtktreeview.c (size_allocate): Move to a different drawing
+ system. Instead of having a window the size of the tree, we have
+ a window the size of widget->allocation, and simply draw with the
+ offset.
+ (coords_are_over_arrow): ditto. Move to window coordinates.
+ (do_prelight): ditto
+ (do_unprelight): ditto
+
+ * gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
+ Minor fix from Kristian Rietveld to fix unsorted case.
+
2001-10-22 jacob berkman <jacob@ximian.com>
* gtk/gtkclist.c (cell_size_request): don't cast a PIXTEXT cell to
+Mon Oct 22 14:08:26 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * demos/gtk-demo/appwindow.c: Remove handle_box from App demo.
+
+ * gtk/gtktreeview.c (size_allocate): Move to a different drawing
+ system. Instead of having a window the size of the tree, we have
+ a window the size of widget->allocation, and simply draw with the
+ offset.
+ (coords_are_over_arrow): ditto. Move to window coordinates.
+ (do_prelight): ditto
+ (do_unprelight): ditto
+
+ * gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
+ Minor fix from Kristian Rietveld to fix unsorted case.
+
2001-10-22 jacob berkman <jacob@ximian.com>
* gtk/gtkclist.c (cell_size_request): don't cast a PIXTEXT cell to
+Mon Oct 22 14:08:26 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * demos/gtk-demo/appwindow.c: Remove handle_box from App demo.
+
+ * gtk/gtktreeview.c (size_allocate): Move to a different drawing
+ system. Instead of having a window the size of the tree, we have
+ a window the size of widget->allocation, and simply draw with the
+ offset.
+ (coords_are_over_arrow): ditto. Move to window coordinates.
+ (do_prelight): ditto
+ (do_unprelight): ditto
+
+ * gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
+ Minor fix from Kristian Rietveld to fix unsorted case.
+
2001-10-22 jacob berkman <jacob@ximian.com>
* gtk/gtkclist.c (cell_size_request): don't cast a PIXTEXT cell to
+Mon Oct 22 14:08:26 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * demos/gtk-demo/appwindow.c: Remove handle_box from App demo.
+
+ * gtk/gtktreeview.c (size_allocate): Move to a different drawing
+ system. Instead of having a window the size of the tree, we have
+ a window the size of widget->allocation, and simply draw with the
+ offset.
+ (coords_are_over_arrow): ditto. Move to window coordinates.
+ (do_prelight): ditto
+ (do_unprelight): ditto
+
+ * gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
+ Minor fix from Kristian Rietveld to fix unsorted case.
+
2001-10-22 jacob berkman <jacob@ximian.com>
* gtk/gtkclist.c (cell_size_request): don't cast a PIXTEXT cell to
+Mon Oct 22 14:08:26 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * demos/gtk-demo/appwindow.c: Remove handle_box from App demo.
+
+ * gtk/gtktreeview.c (size_allocate): Move to a different drawing
+ system. Instead of having a window the size of the tree, we have
+ a window the size of widget->allocation, and simply draw with the
+ offset.
+ (coords_are_over_arrow): ditto. Move to window coordinates.
+ (do_prelight): ditto
+ (do_unprelight): ditto
+
+ * gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
+ Minor fix from Kristian Rietveld to fix unsorted case.
+
2001-10-22 jacob berkman <jacob@ximian.com>
* gtk/gtkclist.c (cell_size_request): don't cast a PIXTEXT cell to
+Mon Oct 22 14:08:26 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * demos/gtk-demo/appwindow.c: Remove handle_box from App demo.
+
+ * gtk/gtktreeview.c (size_allocate): Move to a different drawing
+ system. Instead of having a window the size of the tree, we have
+ a window the size of widget->allocation, and simply draw with the
+ offset.
+ (coords_are_over_arrow): ditto. Move to window coordinates.
+ (do_prelight): ditto
+ (do_unprelight): ditto
+
+ * gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
+ Minor fix from Kristian Rietveld to fix unsorted case.
+
2001-10-22 jacob berkman <jacob@ximian.com>
* gtk/gtkclist.c (cell_size_request): don't cast a PIXTEXT cell to
+Mon Oct 22 14:08:26 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * demos/gtk-demo/appwindow.c: Remove handle_box from App demo.
+
+ * gtk/gtktreeview.c (size_allocate): Move to a different drawing
+ system. Instead of having a window the size of the tree, we have
+ a window the size of widget->allocation, and simply draw with the
+ offset.
+ (coords_are_over_arrow): ditto. Move to window coordinates.
+ (do_prelight): ditto
+ (do_unprelight): ditto
+
+ * gtk/gtktreemodelsort.c (gtk_tree_model_sort_rows_reordered):
+ Minor fix from Kristian Rietveld to fix unsorted case.
+
2001-10-22 jacob berkman <jacob@ximian.com>
* gtk/gtkclist.c (cell_size_request): don't cast a PIXTEXT cell to
if (!window)
{
GtkWidget *table;
- GtkWidget *menubar_handle;
- GtkWidget *toolbar_handle;
GtkWidget *toolbar;
GtkWidget *statusbar;
GtkWidget *contents;
gtk_accel_group_attach (accel_group, G_OBJECT (window));
gtk_accel_group_unref (accel_group);
- menubar_handle = gtk_handle_box_new ();
-
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
/* Set up item factory to go away with the window */
gtk_item_factory_create_items (item_factory, G_N_ELEMENTS (menu_items),
menu_items, window);
- gtk_container_add (GTK_CONTAINER (menubar_handle),
- gtk_item_factory_get_widget (item_factory, "<main>"));
-
gtk_table_attach (GTK_TABLE (table),
- menubar_handle,
+ gtk_item_factory_get_widget (item_factory, "<main>"),
/* X direction */ /* Y direction */
0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
/* Create the toolbar
*/
- toolbar_handle = gtk_handle_box_new ();
-
toolbar = gtk_toolbar_new ();
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar),
window, /* user data for callback */
-1); /* -1 means "append" */
- gtk_container_add (GTK_CONTAINER (toolbar_handle), toolbar);
-
gtk_table_attach (GTK_TABLE (table),
- toolbar_handle,
+ toolbar,
/* X direction */ /* Y direction */
0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
+Thu Oct 18 16:40:00 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtk-docs.sgml: add GtkCellEditable and GtkTreeModelSort.
+
Sat Oct 20 18:35:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/tmpl/gtkentry.sgml (Note): Remove note about
</para>
+<!-- ##### TYPEDEF GdkAtom ##### -->
+<para>
+A numeric type representing a string as an index into a table
+of strings on the X server.
+</para>
+
+
<!-- ##### STRUCT GdkColorContext ##### -->
<para>
</para>
-<!-- ##### TYPEDEF GdkAtom ##### -->
-<para>
-A numeric type representing a string as an index into a table
-of strings on the X server.
-</para>
-
-
<!-- ##### MACRO GDK_NONE ##### -->
<para>
A null value for #GdkAtom, used in a similar way as <literal>None</literal>
</para>
-<!-- ##### ENUM GdkSelection ##### -->
+<!-- ##### TYPEDEF GdkSelection ##### -->
<para>
The #GdkSelection enumeration contains predefined
atom values for several common selections.
</para>
-@GDK_SELECTION_PRIMARY: The primary X selection. Programs
-typically claim this selection when the user
-selects text and paste its contents in response
-to a middle button press.
-@GDK_SELECTION_SECONDARY: An additional X selection.
-<!-- ##### ENUM GdkSelectionType ##### -->
+<!-- ##### TYPEDEF GdkSelectionType ##### -->
<para>
The #GdkSelectionType enumeration contains predefined
atom values used to represent the types of data transferred
may be useful for compatibility with older programs.
</para>
-@GDK_SELECTION_TYPE_ATOM: An atom. (format 32)
-@GDK_SELECTION_TYPE_BITMAP: A bitmap ID. (format 32)
-@GDK_SELECTION_TYPE_COLORMAP: A colormap ID. (format 32)
-@GDK_SELECTION_TYPE_DRAWABLE: A drawable ID. (format 32)
-@GDK_SELECTION_TYPE_INTEGER: An integer. (format 32)
-@GDK_SELECTION_TYPE_PIXMAP: A pixmap ID. (format 32)
-@GDK_SELECTION_TYPE_WINDOW: A window ID. (format 32)
-@GDK_SELECTION_TYPE_STRING: A string encoded
- in ISO Latin-1. (With the additional of <symbol>TAB</symbol>
- and <symbol>NEWLINE</symbol>.) (format 8)
-
-<!-- ##### ENUM GdkTarget ##### -->
+
+<!-- ##### TYPEDEF GdkTarget ##### -->
<para>
The #GdkTarget enumeration contains predefined atom values which are
used to describe possible targets for a selection. Other atoms can be
compatibility with older programs.
</para>
-@GDK_TARGET_BITMAP: A bitmap ID.
-@GDK_TARGET_COLORMAP: A colormap ID.
-@GDK_TARGET_DRAWABLE: A drawable ID.
-@GDK_TARGET_PIXMAP: A pixmap ID.
-@GDK_TARGET_STRING: A string encoded in ISO Latin-1.
- (With the additional of <symbol>TAB</symbol>
- and <symbol>NEWLINE</symbol>.)
<!-- ##### FUNCTION gdk_selection_owner_set ##### -->
<para>
</figure>
@parent_instance: inherited portion from #GObject
-@type: The type of this visual.
+@type: The type of this visual.
@depth: The number of bits per pixel.
@byte_order: The byte-order for this visual.
@colormap_size: The number of entries in the colormap, for
of the information in <structfield>blue_mask</structfield>.
@blue_prec: See above.
-
<!-- ##### ENUM GdkVisualType ##### -->
<para>
A set of values that describe the manner in which the
structure describe how the components are assembled into a pixel value.
@GDK_VISUAL_DIRECT_COLOR: Each pixel value contains red, green, and blue
components as for %GDK_TRUE_COLOR, but the components are mapped via a
- color table into the final output table instead of being converted directly.
+ color table into the final output table instead of being converted directly.
<!-- ##### ENUM GdkByteOrder ##### -->
<para>
@GDK_LSB_FIRST: The values are stored with the least-significant byte
first. For instance, the 32-bit value 0xffeecc would be stored
- in memory as 0xcc, 0xee, 0xff, 0x00.
+ in memory as 0xcc, 0xee, 0xff, 0x00.
@GDK_MSB_FIRST: The values are stored with the most-significant byte
first. For instance, the 32-bit value 0xffeecc would be stored
in memory as 0x00, 0xcc, 0xee, 0xff.
</para>
-@depths:
+@depths:
@count:
</para>
@visual_types:
-@count:
+@count:
<!-- ##### FUNCTION gdk_list_visuals ##### -->
</para>
-@Returns:
+@Returns:
<!-- ##### FUNCTION gdk_visual_get_best_depth ##### -->
</para>
-@Returns:
+@Returns:
<!-- ##### FUNCTION gdk_visual_get_best_type ##### -->
</para>
-@Returns:
+@Returns:
<!-- ##### FUNCTION gdk_visual_get_best ##### -->
</para>
-@Returns:
+@Returns:
<!-- ##### FUNCTION gdk_visual_get_best_with_depth ##### -->
</para>
+
<!-- ##### MACRO GDK_ROOT_PARENT ##### -->
<para>
Obtains the Xlib window id of the root window of the default screen.
</para>
+
<!-- ##### MACRO GDK_DISPLAY ##### -->
<para>
The current display.
Returns the X window belonging to a #GdkWindow.
</para>
-@win: a #GdkWindow.
+@win: a #GdkWindow.
@Returns: the Xlib <type>Window</type> of @win.
Returns the display of a #GdkDrawable.
</para>
-@win: a #GdkDrawable.
+@win: a #GdkDrawable.
@Returns: an Xlib <type>Display*</type>.
Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
</para>
-@win: a #GdkDrawable.
-@Returns: the ID of @win's X resource.
+@win: a #GdkDrawable.
+@Returns: the ID of @win's X resource.
<!-- ##### MACRO GDK_IMAGE_XDISPLAY ##### -->
Returns the display of a #GdkGC.
</para>
-@gc: a #GdkGC.
+@gc: a #GdkGC.
@Returns: an Xlib <type>Display*</type>.
Returns the display of a #GdkColormap.
</para>
-@cmap: a #GdkColormap.
+@cmap: a #GdkColormap.
@Returns: an Xlib <type>Display*</type>.
Returns the X colormap belonging to a #GdkColormap.
</para>
-@cmap: a #GdkColormap.
+@cmap: a #GdkColormap.
@Returns: an Xlib <type>Colormap</type>.
</para>
@cursor: a #GdkCursor.
-@Returns: an Xlib <type>Cursor</type.
+@Returns: an Xlib <type>Cursor</type.
<!-- ##### MACRO GDK_CURSOR_XDISPLAY ##### -->
Returns a #GdkVisual corresponding to a X visual.
</para>
-@xvisualid: a X visual id.
-@Returns: the #GdkVisual.
+@xvisualid: a X visual id.
+@Returns: the #GdkVisual.
<!-- ##### FUNCTION gdkx_colormap_get ##### -->
a #GdkWindow or a #GdkFont.
-<!-- ##### MACRO gdk_window_lookup ##### -->
+<!-- ##### FUNCTION gdk_window_lookup ##### -->
<para>
Obtains the #GdkWindow for the given Xlib window ID, or %NULL if no #GdkWindow has
been created for @xid.
</para>
+@anid:
+@Returns:
+<!-- # Unused Parameters # -->
@xid: Xlib window ID
-<!-- ##### MACRO gdk_pixmap_lookup ##### -->
+<!-- ##### FUNCTION gdk_pixmap_lookup ##### -->
<para>
Obtains the #GdkPixmap for the given Xlib pixmap ID, or %NULL if no #GdkPixmap has
been created for @xid.
</para>
+@anid:
+@Returns:
+<!-- # Unused Parameters # -->
@xid: Xlib pixmap ID
</para>
@cursor: a #GdkCursor.
+@Returns:
+<!-- # Unused Parameters # -->
@Retursn: an Xlib <type>Cursor</type.
Returns the display of a #GdkGC.
</para>
-@gc: a #GdkGC.
+@gc: a #GdkGC.
@Returns: an Xlib <type>Display*</type>.
</para>
+
<!-- ##### FUNCTION gdk_x11_image_get_xdisplay ##### -->
<para>
Returns the display of a #GdkImage.
</para>
-@drawable: a #GdkImage.
+@image:
@Returns: an Xlib <type>Display*</type>.
+<!-- # Unused Parameters # -->
+@drawable: a #GdkImage.
<!-- ##### FUNCTION gdk_x11_image_get_ximage ##### -->
<!entity GtkTree SYSTEM "sgml/gtktree.sgml">
<!entity GtkTreeItem SYSTEM "sgml/gtktreeitem.sgml">
<!entity gtk-GtkTreeModel SYSTEM "sgml/gtktreemodel.sgml">
+<!entity gtk-GtkTreeSortable SYSTEM "sgml/gtktreesortable.sgml">
<!entity gtk-GtkTreeModelSort SYSTEM "sgml/gtktreemodelsort.sgml">
<!entity gtk-GtkTreeSelection SYSTEM "sgml/gtktreeselection.sgml">
<!entity gtk-GtkTreeStore SYSTEM "sgml/gtktreestore.sgml">
<!entity gtk-GtkTreeViewColumn SYSTEM "sgml/gtktreeviewcolumn.sgml">
<!entity gtk-GtkTreeView SYSTEM "sgml/gtktreeview.sgml">
<!entity gtk-GtkCellRenderer SYSTEM "sgml/gtkcellrenderer.sgml">
+<!entity gtk-GtkCellEditable SYSTEM "sgml/gtkcelleditable.sgml">
<!entity gtk-GtkCellRendererPixbuf SYSTEM "sgml/gtkcellrendererpixbuf.sgml">
<!entity gtk-GtkCellRendererText SYSTEM "sgml/gtkcellrenderertext.sgml">
<!entity gtk-GtkCellRendererToggle SYSTEM "sgml/gtkcellrenderertoggle.sgml">
>k-TreeWidget;
>k-GtkTreeModel;
>k-GtkTreeSelection;
- >k-GtkTreeStore;
>k-GtkTreeViewColumn;
>k-GtkTreeView;
>k-GtkTreeDND;
+ >k-GtkTreeSortable;
>k-GtkTreeModelSort;
>k-GtkCellRenderer;
+ >k-GtkCellEditable;
>k-GtkCellRendererPixbuf;
>k-GtkCellRendererText;
>k-GtkCellRendererToggle;
>k-GtkListStore;
+ >k-GtkTreeStore;
</sect1>
<sect1 id="MenusAndCombos">
<title>Menus, Combo Box, Toolbar</title>
gtkenums.sgml
-<!-- ##### SECTION ./tmpl/gtkimcontextsimple.sgml:Title ##### -->
-GtkIMContextSimple
-
-
<!-- ##### SECTION ./tmpl/gtkmarshal.sgml:Long_Description ##### -->
<refsect2>
<title>What are Signal Marshallers?</title>
</para>
-<!-- ##### STRUCT GtkIMContextSimple ##### -->
-<para>
-
-</para>
-
-@object:
-@tables:
-@compose_buffer:
-@tentative_match:
-@tentative_match_len:
-
<!-- ##### USER_FUNCTION GtkImageLoader ##### -->
<para>
A GtkImageLoader is used to load a filename found in
@tree_model:
@iter:
+<!-- ##### FUNCTION gtk_tree_model_sort_convert_iter ##### -->
+<para>
+
+</para>
+
+@tree_model_sort:
+@sort_iter:
+@child_iter:
+
+<!-- ##### FUNCTION gtk_tree_model_sort_convert_path ##### -->
+<para>
+
+</para>
+
+@tree_model_sort:
+@child_path:
+@Returns:
+@path:
+
+<!-- ##### FUNCTION gtk_tree_model_sort_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
<!-- ##### FUNCTION gtk_tree_model_sort_set_compare ##### -->
<para>
@tree_model_sort:
@func:
+<!-- ##### FUNCTION gtk_tree_model_sort_set_model ##### -->
+<para>
+
+</para>
+
+@tree_model_sort:
+@child_model:
+@model:
+
<!-- ##### FUNCTION gtk_tree_model_sort_set_sort_column ##### -->
<para>
--- /dev/null
+<!-- ##### SECTION Title ##### -->
+gtkcelleditable
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GtkCellEditable ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT GtkCellEditableIface ##### -->
+<para>
+
+</para>
+
+@g_iface:
+@editing_done:
+@remove_widget:
+@start_editing:
+
+<!-- ##### FUNCTION gtk_cell_editable_start_editing ##### -->
+<para>
+
+</para>
+
+@cell_editable:
+@event:
+
+
+<!-- ##### FUNCTION gtk_cell_editable_editing_done ##### -->
+<para>
+
+</para>
+
+@cell_editable:
+
+
+<!-- ##### FUNCTION gtk_cell_editable_remove_widget ##### -->
+<para>
+
+</para>
+
+@cell_editable:
+
+
drag.
@button: The button the user clicked to start the drag.
@event: The event that triggered the start of the
- drag.
+ drag.
@Returns: The context for this drag.
</para>
@scrolled_window: A #GtkScrolledWindow.
+@hadjustment:
+<!-- # Unused Parameters # -->
@vadjustment: Vertical scroll adjustment.
</para>
-<!-- ##### FUNCTION gtk_tree_model_sort_new ##### -->
-<para>
-
-</para>
-
-@Returns:
-
-
<!-- ##### FUNCTION gtk_tree_model_sort_new_with_model ##### -->
<para>
@model:
-<!-- ##### FUNCTION gtk_tree_model_sort_set_model ##### -->
-<para>
-
-</para>
-
-@tree_model_sort:
-@child_model:
-<!-- # Unused Parameters # -->
-@model:
-
-
<!-- ##### FUNCTION gtk_tree_model_sort_get_model ##### -->
<para>
@Returns:
-<!-- ##### FUNCTION gtk_tree_model_sort_convert_path ##### -->
-<para>
-
-</para>
-
-@tree_model_sort:
-@child_path:
-@Returns:
-<!-- # Unused Parameters # -->
-@path:
-
-
-<!-- ##### FUNCTION gtk_tree_model_sort_convert_iter ##### -->
-<para>
-
-</para>
-
-@tree_model_sort:
-@sort_iter:
-@child_iter:
-
-
--- /dev/null
+<!-- ##### SECTION Title ##### -->
+gtktreesortable
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GtkTreeSortable ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT GtkTreeSortableIface ##### -->
+<para>
+
+</para>
+
+@g_iface:
+@sort_column_changed:
+@get_sort_column_id:
+@set_sort_column_id:
+@set_sort_func:
+@set_default_sort_func:
+@has_default_sort_func:
+
+<!-- ##### USER_FUNCTION GtkTreeIterCompareFunc ##### -->
+<para>
+
+</para>
+
+@model:
+@a:
+@b:
+@user_data:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_tree_sortable_sort_column_changed ##### -->
+<para>
+
+</para>
+
+@sortable:
+
+
+<!-- ##### FUNCTION gtk_tree_sortable_get_sort_column_id ##### -->
+<para>
+
+</para>
+
+@sortable:
+@sort_column_id:
+@order:
+@Returns:
+
+
+<!-- ##### FUNCTION gtk_tree_sortable_set_sort_column_id ##### -->
+<para>
+
+</para>
+
+@sortable:
+@sort_column_id:
+@order:
+
+
+<!-- ##### FUNCTION gtk_tree_sortable_set_sort_func ##### -->
+<para>
+
+</para>
+
+@sortable:
+@sort_column_id:
+@sort_func:
+@user_data:
+@destroy:
+
+
+<!-- ##### FUNCTION gtk_tree_sortable_set_default_sort_func ##### -->
+<para>
+
+</para>
+
+@sortable:
+@sort_func:
+@user_data:
+@destroy:
+
+
+<!-- ##### FUNCTION gtk_tree_sortable_has_default_sort_func ##### -->
+<para>
+
+</para>
+
+@sortable:
+@Returns:
+
+
* @dx: Amount to scroll in the X direction
* @dy: Amount to scroll in the Y direction
*
- * Scroll the contents of its window, both pixels and children, by
- * the given amount. Portions of the window that the scroll operation
- * brings in from offscreen areas are invalidated. The invalidated
- * region may be bigger than what would strictly be necessary.
- * (For X11, a minimum area will be invalidated if the window has
- * no subwindows, or if the edges of the window's parent do not extend
- * beyond the edges of the window. In other cases, a multi-step process
- * is used to scroll the window which may produce temporary visual
- * artifacts and unnecessary invalidations.)
+ * Scroll the contents of @window, both pixels and children, by the given
+ * amount. @window itself does not move. Portions of the window that the scroll
+ * operation brings in from offscreen areas are invalidated. The invalidated
+ * region may be bigger than what would strictly be necessary. (For X11, a
+ * minimum area will be invalidated if the window has no subwindows, or if the
+ * edges of the window's parent do not extend beyond the edges of the window. In
+ * other cases, a multi-step process is used to scroll the window which may
+ * produce temporary visual artifacts and unnecessary invalidations.)
**/
void
gdk_window_scroll (GdkWindow *window,
}
for (i = 0; i < level->array->len; i++)
- g_array_index (level->array, SortElt, i).offset = new_order[i];
+ {
+ g_array_index (level->array, SortElt, i).offset = new_order[i];
+
+ if (GTK_TREE_MODEL_SORT_CACHE_CHILD_ITERS (tree_model_sort))
+ {
+ get_child_iter_from_elt_no_cache (tree_model_sort,
+ &(g_array_index (level->array, SortElt, i).iter), level, &g_array_index (level->array, SortElt, i));
+ }
+ }
gtk_tree_model_sort_increment_stamp (tree_model_sort);
GdkWindow *drag_window;
GdkWindow *drag_highlight_window;
GtkTreeViewColumn *drag_column;
+
+ /* bin_window offset */
+ gint dy;
gint drag_column_x;
GtkTreeViewColumn *expander_column;
* The "cell" areas are the cell_area passed in to gtk_cell_renderer_render(),
* i.e. just the cells, no spacing.
*/
-#define BACKGROUND_FIRST_PIXEL(tree_view,tree,node) (_gtk_rbtree_node_find_offset ((tree), (node)) + TREE_VIEW_HEADER_HEIGHT ((tree_view)))
-#define CELL_FIRST_PIXEL(tree_view,tree,node,separator) (BACKGROUND_FIRST_PIXEL (tree_view,tree,node) + separator/2)
#define BACKGROUND_HEIGHT(node) (GTK_RBNODE_GET_HEIGHT (node))
#define CELL_HEIGHT(node, separator) (BACKGROUND_HEIGHT (node) - separator);
-#define TREE_WINDOW_Y_TO_RBTREE_Y(tree_view,y) ((y) - TREE_VIEW_HEADER_HEIGHT (tree_view))
-#define RBTREE_Y_TO_TREE_WINDOW_Y(tree_view,y) ((y) + TREE_VIEW_HEADER_HEIGHT (tree_view))
+#define TREE_WINDOW_Y_TO_RBTREE_Y(tree_view,y) ((y) - TREE_VIEW_HEADER_HEIGHT (tree_view) + tree_view->priv->dy)
+#define RBTREE_Y_TO_TREE_WINDOW_Y(tree_view,y) ((y) + TREE_VIEW_HEADER_HEIGHT (tree_view) - tree_view->priv->dy)
+
+/* This is in Window coordinates */
+#define BACKGROUND_FIRST_PIXEL(tree_view,tree,node) (RBTREE_Y_TO_TREE_WINDOW_Y (tree_view, _gtk_rbtree_node_find_offset ((tree), (node))))
+#define CELL_FIRST_PIXEL(tree_view,tree,node,separator) (BACKGROUND_FIRST_PIXEL (tree_view,tree,node) + separator/2)
typedef struct _GtkTreeViewChild GtkTreeViewChild;
/* We need some padding */
tree_view->priv->tab_offset += EXPANDER_EXTRA_PADDING;
-
+ tree_view->priv->dy = 0;
tree_view->priv->n_columns = 0;
tree_view->priv->header_height = 1;
tree_view->priv->x_drag = 0;
attributes.x = 0;
attributes.y = 0;
attributes.width = tree_view->priv->width;
- attributes.height = tree_view->priv->height + TREE_VIEW_HEADER_HEIGHT (tree_view);
+ attributes.height = widget->allocation.height;
attributes.event_mask = GDK_EXPOSURE_MASK |
GDK_SCROLL_MASK |
GDK_POINTER_MOTION_MASK |
gdk_window_resize (tree_view->priv->header_window,
MAX (tree_view->priv->width, allocation->width),
tree_view->priv->header_height);
- if (tree_view->priv->width < allocation->width)
- gdk_window_resize (tree_view->priv->bin_window,
- allocation->width,
- tree_view->priv->height + TREE_VIEW_HEADER_HEIGHT (tree_view));
-
+ gdk_window_resize (tree_view->priv->bin_window,
+ tree_view->priv->width,
+ allocation->height);
_gtk_tree_view_update_col_width (tree_view);
}
if (tree_view->priv->hadjustment->value + allocation->width > tree_view->priv->width)
tree_view->priv->hadjustment->value = MAX (tree_view->priv->width - allocation->width, 0);
- gtk_signal_emit_by_name (GTK_OBJECT (tree_view->priv->hadjustment), "changed");
+ gtk_adjustment_changed (tree_view->priv->hadjustment);
tree_view->priv->vadjustment->page_size = allocation->height - TREE_VIEW_HEADER_HEIGHT (tree_view);
tree_view->priv->vadjustment->step_increment = (tree_view->priv->vadjustment->page_size) / 10;
if (tree_view->priv->vadjustment->value + allocation->height > tree_view->priv->height)
gtk_adjustment_set_value (tree_view->priv->vadjustment,
MAX (tree_view->priv->height - allocation->height, 0));
-
- gtk_signal_emit_by_name (GTK_OBJECT (tree_view->priv->vadjustment), "changed");
+ gtk_adjustment_changed (tree_view->priv->vadjustment);
if (tree_view->priv->scroll_to_path != NULL ||
tree_view->priv->scroll_to_column != NULL)
}
/* find the node that was clicked */
- new_y = ((gint) event->y < TREE_VIEW_HEADER_HEIGHT (tree_view)) ? TREE_VIEW_HEADER_HEIGHT (tree_view) : (gint)event->y;
- y_offset = -_gtk_rbtree_find_offset (tree_view->priv->tree,
- TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, new_y),
- &tree,
- &node) + new_y - (gint)event->y;
+ new_y = TREE_WINDOW_Y_TO_RBTREE_Y(tree_view, event->y);
+ if (new_y < 0)
+ new_y = 0;
+ y_offset = -_gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node);
if (node == NULL)
/* We clicked in dead space */
coords_are_over_arrow (GtkTreeView *tree_view,
GtkRBTree *tree,
GtkRBNode *node,
- /* these are in tree window coords */
+ /* these are in window coords */
gint x,
gint y)
{
return (x >= arrow.x &&
x < (arrow.x + arrow.width) &&
- y >= arrow.y &&
- y < (arrow.y + arrow.height));
+ y >= arrow.y &&
+ y < (arrow.y + arrow.height));
}
static void
do_prelight (GtkTreeView *tree_view,
GtkRBTree *tree,
GtkRBNode *node,
- /* these are in tree window coords */
+ /* these are in tree_window coords */
gint x,
gint y)
{
if (coords_are_over_arrow (tree_view, tree, node, x, y))
- GTK_TREE_VIEW_SET_FLAG (tree_view, GTK_TREE_VIEW_ARROW_PRELIT);
+ {
+ GTK_TREE_VIEW_SET_FLAG (tree_view, GTK_TREE_VIEW_ARROW_PRELIT);
+ }
tree_view->priv->prelight_node = node;
tree_view->priv->prelight_tree = tree;
old_prelight_tree = tree_view->priv->prelight_tree;
old_prelight_node = tree_view->priv->prelight_node;
old_arrow_prelit = GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_ARROW_PRELIT);
- do_unprelight (tree_view, event->x, event->y);
-
- new_y = ((gint)event->y<TREE_VIEW_HEADER_HEIGHT (tree_view))?TREE_VIEW_HEADER_HEIGHT (tree_view):(gint)event->y;
- _gtk_rbtree_find_offset (tree_view->priv->tree,
- TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, new_y),
- &tree,
- &node);
+ new_y = TREE_WINDOW_Y_TO_RBTREE_Y(tree_view, event->y);
+ if (new_y < 0)
+ new_y = 0;
+ do_unprelight (tree_view, event->x, event->y);
+ _gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node);
if (tree == NULL)
return TRUE;
return TRUE;
- do_prelight (tree_view, tree, node, event->x, new_y);
+ do_prelight (tree_view, tree, node, event->x, event->y);
if (old_prelight_node != tree_view->priv->prelight_node)
{
if (old_prelight_node)
- gtk_tree_view_queue_draw_node (tree_view,
+ {
+ gtk_tree_view_queue_draw_node (tree_view,
old_prelight_tree,
old_prelight_node,
NULL);
-
+ }
if (tree_view->priv->prelight_node)
- gtk_tree_view_queue_draw_node (tree_view,
+ {
+ gtk_tree_view_queue_draw_node (tree_view,
tree_view->priv->prelight_tree,
tree_view->priv->prelight_node,
NULL);
+ }
}
else if (old_arrow_prelit != GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_ARROW_PRELIT))
{
if (tree_view->priv->prelight_node)
- gtk_tree_view_queue_draw_node (tree_view,
- tree_view->priv->prelight_tree,
- tree_view->priv->prelight_node,
- NULL);
+ {
+ gtk_tree_view_queue_draw_node (tree_view,
+ tree_view->priv->prelight_tree,
+ tree_view->priv->prelight_node,
+ NULL);
+ }
}
return TRUE;
}
if (tree_view->priv->tree == NULL)
return TRUE;
+ /* clip event->area to the visible area */
+ if (event->area.y < TREE_VIEW_HEADER_HEIGHT (tree_view))
+ {
+ event->area.height -= (TREE_VIEW_HEADER_HEIGHT (tree_view) - event->area.y);
+ event->area.y = TREE_VIEW_HEADER_HEIGHT (tree_view);
+
+ if (event->area.height < 0)
+ return TRUE;
+ }
+
gtk_tree_view_check_dirty_and_clean (GTK_TREE_VIEW (widget));
- /* we want to account for a potential HEADER offset. That is, if the header
- * exists, we want to offset our event by its height to find the right node.
- */
- new_y = (event->area.y<TREE_VIEW_HEADER_HEIGHT (tree_view))?TREE_VIEW_HEADER_HEIGHT (tree_view):event->area.y;
- y_offset = -_gtk_rbtree_find_offset (tree_view->priv->tree,
- TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, new_y),
- &tree,
- &node) + new_y - event->area.y;
+ new_y = TREE_WINDOW_Y_TO_RBTREE_Y(tree_view, event->area.y);
+ if (new_y < 0)
+ new_y = 0;
+ y_offset = -_gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node);
+
if (node == NULL)
return TRUE;
background_area.y = y_offset + event->area.y;
background_area.height = max_height;
+
flags = 0;
if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PRELIT))
* level of the tree we're dropping at.
*/
highlight_x = cell_area.x;
-
gtk_tree_view_column_cell_render (column,
event->window,
&background_area,
return TRUE;
/* find the node internally */
- new_y = ((gint)event->y<TREE_VIEW_HEADER_HEIGHT (tree_view))?TREE_VIEW_HEADER_HEIGHT (tree_view):(gint)event->y;
-
- _gtk_rbtree_find_offset (tree_view->priv->tree,
- TREE_WINDOW_Y_TO_RBTREE_Y (tree_view, new_y),
- &tree,
- &node);
+ new_y = TREE_WINDOW_Y_TO_RBTREE_Y(tree_view, event->y);
+ if (new_y < 0)
+ new_y = 0;
+ _gtk_rbtree_find_offset (tree_view->priv->tree, new_y, &tree, &node);
if (node == NULL)
return FALSE;
- do_prelight (tree_view, tree, node, event->x, new_y);
+ do_prelight (tree_view, tree, node, event->x, event->y);
if (tree_view->priv->prelight_node)
gtk_tree_view_queue_draw_node (tree_view,
g_return_val_if_fail (GTK_IS_TREE_VIEW (widget), FALSE);
+ if (event->mode == GDK_CROSSING_GRAB)
+ return TRUE;
tree_view = GTK_TREE_VIEW (widget);
if (tree_view->priv->prelight_node)
{
if (GTK_WIDGET_REALIZED (tree_view))
{
+ gint dy;
gdk_window_move (tree_view->priv->bin_window,
- tree_view->priv->hadjustment->value,
- - tree_view->priv->vadjustment->value);
+ 0);
gdk_window_move (tree_view->priv->header_window,
- tree_view->priv->hadjustment->value,
0);
+ dy = tree_view->priv->dy - (int) tree_view->priv->vadjustment->value;
+ gdk_window_scroll (tree_view->priv->bin_window, 0, dy);
+ tree_view->priv->dy = (int) tree_view->priv->vadjustment->value;
gdk_window_process_updates (tree_view->priv->bin_window, TRUE);
gdk_window_process_updates (tree_view->priv->header_window, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), scrolled_window, TRUE, TRUE, 0);
model = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
-
smodel = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (model));
ssmodel = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (smodel));